<section class="container  col-md-12" ng-init="isCancelConfirm=false;">
		<form name="form" method="post" novalidate="novalidate">
	        <div class="profile_content col-md-12">
              <h1>场馆信息</h1>
              <div class="col-md-8 row">
                <h2>基本信息</h2>
                <table style="width:90%; margin-left:5%" border="0" cellspacing="0" cellpadding="0">
                  <tbody>
                    <tr>
                      <th style="width:100px;">场馆名称：</th>
                      <td>
                        {{profile.name}}
                      </td>
                    </tr>
                    <tr>
                      <th>营业时间：</th>
                      <td >
                        <div ng-show="!page.useEdit">
                            {{profile.openTime}} - {{profile.closeTime}}
                        </div>
                        <div ng-show="page.useEdit" class="row">
                          <div class="col-md-4">
                            <p class="input-group">
                              <timepicker class="" ng-model="profile.topenTime" hour-step="profile.hstep" minute-step="profile.mstep" show-meridian="false" ng-change="changed()" ></timepicker> 
                            </p>
                          </div>
                          <div class="col-md-4">
                            <p class="input-group">
                              <timepicker class="" ng-model="profile.tcloseTime" hour-step="profile.hstep" minute-step="profile.mstep" show-meridian="false" ng-change="changed()" ></timepicker>
                            </p>
                          </div>
                        </div>
                      </td>
                    </tr>
                    <tr>
                      <th>场馆地址：</th>
                      <td>
                        <div ng-show="!page.useEdit">
                            <span>{{profile.region.shengShi}}</span>&nbsp;&nbsp;<span>{{profile.region.shiQuXian}}</span>&nbsp;&nbsp;<span>{{profile.region.shangQuan}}</span><br>
                            <span>{{profile.address}}</span>
                        </div>
                        <div ng-show="page.useEdit">
                            <select data-ng-options="shengshi as shengshi for shengshi in shengshis"
                            	ng-change="getShiQuXian()" ng-model="profile.region.shengShi">
                            	<option value="">请选择城市</option>
                        	</select>
                            
                             <select data-ng-options="shiquxian as shiquxian for shiquxian in shiquxians"
                            	ng-change="getShangQuan()" ng-model="profile.region.shiQuXian">
                                <option value="">请选择市区</option>
                            </select>
                             <select data-ng-options="shangquan.id as shangquan.name for shangquan in shangquans"
                            	data-ng-model="profile.region.id">
                                <option value="">请选择商圈</option>
                            </select>
                            <input type="text" class="input_style_01" ng-model="profile.address">
                            <div class="errormsg">{{errMsg.emptyRegion}}</div>
                        </div>
                      </td>
                    </tr>
                    <tr>
                      <th>主负责人：</th>
                      <td>
                        <div ng-show="!page.useEdit">
                            {{profile.contactName}}&nbsp;&nbsp;&nbsp;&nbsp;{{profile.contactMobile}}
                        </div>
                        
                        <div ng-show="page.useEdit">
                            <select class="table_select" data-ng-options="coach.id as coach.name for coach in coachs" ng-change="changeContact();" data-ng-model="profile.contactId">
                                <option value="">请选择联系人</option>
                            </select>
                            <input class="tel" type="text" ng-model="profile.contactMobile" disabled="disabled">
                            <div class="errormsg">{{errMsg.emptyContact}}</div>
                            <p class="sis">请选择一位教练作为您的主负责人，若不选，将无法接收约课消息</p>
                        </div>
                      </td>
                    </tr>
                    <tr>
                      <th>服务设施：</th>
                      <td>
                        <div ng-show="!page.useEdit">
                             <ul class="sheb">
                                <li style="opacity:1" ng-repeat="device in profile.devices"><p class="sheb_1"><img alt="" ng-src="{{device.thumbnail}}"><span>{{device.name}}</span></p><font class="cur_img"></font></li>
                             </ul>
                        </div>
                        <div ng-show="page.useEdit">
                             <ul class="sheb">
                                <li ng-repeat="device in deviceCheckeboxs" ng-click="device.checked=!device.checked" ng-class="device.checked==true?'cur':''"><p class="{{'sheb_0'+device.value}}"><img alt="" ng-src="{{device.thumbnail}}"><span>{{device.name}}</span></p><font class="cur_img"></font></li>
                             </ul>
                        </div>
                      </td>
                    </tr>
                    <tr>
                      <th>场馆简介：</th>
                      <td>
                        <div ng-show="!page.useEdit">
                            <p class="textarea_p" style="padding-top:10px;">{{profile.description}}</p>
                        </div>	
                        <div ng-show="page.useEdit">
                            <textarea type="text" class="textarea_style_01" cols="30" rows="10" ng-model="profile.description" maxlength="512"></textarea>
                        </div>
                      </td>
                    </tr>
                  </tbody>
                </table>
                <div class="col-md-4 profile_btn">
                    <div ng-show="!page.useEdit">
                        <button class="btn btn-lg btn-danger btn-block" ng-click="page.useEdit=!page.useEdit">编辑</button>
                    </div>
                    <div class="row" ng-show="page.useEdit">
                    	<div class="col-sm-6">
	                        <button class="btn btn-lg btn-default btn-block" ng-click="unEditForm();">取消</button>
                    	</div>
                    	<div class="col-sm-6">
	                        <button class="btn btn-lg btn-danger btn-block" ng-click="updateProfile();">保存</button>
                    	</div>
                    </div>
                </div>
              </div>
          
	          <div class="col-md-4" style="float:right;">
	        	<div class="row" style="margin-bottom:5%;">
                    <h2>场馆logo<span>（建议上传大于132px的正方形图片）</span></h2>
	        		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		              <tbody>
		                <tr>
		                  <td>
		                   <div ng-show="!page.useEdit" class="cer_block ng-scope profile_logo">
		                   		<div class="gallery-box thumbnail" >
		                    		<img alt="" src="{{profile.logo}}">
		                    	</div>
		                    </div>
		                    <!-- // image upload and display -->
		                    <div qiniu-upload ng-show="page.useEdit" id="pickfiles_logo" uptoken-url="profile/logo/uptoken"  class="cer_block ng-scope profile_logo" files="logoImage" title="点击修改logo">
		                      <div class="gallery-box thumbnail" >
		                      	  <img alt="" ng-show="logoImage.length>0" ng-src="{{logoImage[logoImage.length-1].object.url}}"/>
		                          <img alt="" ng-src="{{profile.logo}}"  ng-hide="logoImage.length>0">
		                      </div>
		                    </div>
		                  </td>
		                </tr>
                      </tbody>
                    </table>
                </div>
                <div class="row">   
                    <h2>场馆图片<span>（至少上传一张,建议大少1242x621px）</span></h2>                
                    <table>
                      <tbody>
		                <tr>
		                  <td>
		                    <div class="cer_block ng-scope">
		                     <div ng-show="page.useEdit" class="gallery-box">
		                      <!-- original certs -->
		                     	<div class="thumbnail" ng-repeat="img in profile.images">
		                          <img ng-src="{{img.url}}" >
		                          <span  ng-show="page.useEdit" class="fa-delete btn btn-danger" ng-click="delOriginProfileImg($index, img.id)">X</span>
		                        </div>
		                      <!--  original end -->
		                      
		                      <!-- new image start -->
		        	 			<div class="thumbnail" ng-repeat="file in profileEditImages track by $index">
		                          <img alt="" ng-src="{{qiniuDomain}}{{file.key}}" >
		                          <span class="fa-delete btn btn-danger" ng-click="delProfileImage(file.id)">X</span>
		                        </div>
		                      <!-- new image end -->
		                      	<div qiniu-upload class="addcer drop" uptoken-url="profile/image/uptoken" id="pickfilesEdit" files="profileEditImages"></div>
		                      	<!--
								<div ng-show="page.useEdit"  class="addcer drop" id="pickfiles"></div>
		        			 	-->
		        			 </div>
		        			 
		        			 <div ng-show="!page.useEdit" class="gallery-box">
		                      <!-- original certs -->
		                     	<div class="thumbnail" ng-repeat="img in profile.images">
		                          <img ng-src="{{img.url}}" >
		                          <span  ng-show="page.useEdit" class="fa-delete btn btn-danger" ng-click="removeProfileImg($index, img.id)">X</span>
		                        </div>
		                      <!--  original end -->
		        			 </div>
		                    </div>
		                  </td>
		                </tr>
		              </tbody>
		            </table>
	        		</div>
	          </div>
            </div>
        </form>
        <div ng-show="page.useOffEditConfirm" off-edit-confirm
	      	   opt_confirm="reUnEditForm();" 
	      	   opt_cancel="page.useOffEditConfirm=false;setParclose(false)">
	      	   <p>您编辑的场馆信息尚未保存，确定要取消编辑吗？</p>
	   	</div>
      <div  id="container" style="display: none"></div>
</section>